package com.s08.h01;

import java.math.BigDecimal;

import com.s08.h01.model.Microwave;
import com.s08.h01.model.PremiumUser;
import com.s08.h01.model.StandardUser;
import com.s08.h01.model.Table;
import com.s08.h01.model.Tv;
import com.s08.h01.model.User;
import com.s08.h01.utils.UserUtils;

public class MyInheritance {

	public static void main(String[] args) {

		StandardUser standardUser = new StandardUser("Jan", "Kowalski");
		standardUser.getCart()[0] = new Microwave(new BigDecimal(("52.50")));
		standardUser.getCart()[1] = new Tv(new BigDecimal(("249.99")));
		standardUser.getCart()[2] = new Table(new BigDecimal(("150")));
		
		PremiumUser premiumUser = new PremiumUser("Albert", "Einstein");
		premiumUser.getCart()[0] = new Tv(new BigDecimal(("499")));
		premiumUser.getCart()[1] = new Table(new BigDecimal(("125")));
		premiumUser.getCart()[2] = new Microwave(new BigDecimal(("89.99")));
		
		User[] users = {standardUser, premiumUser};
		UserUtils.listUsers(users);
	}
}